import React, { Component } from 'react';
import Header from './web/include/header'; 
import './less/index.less';  //引用less
import http from'./http';//引入封装的http请求js
import RouterIndex from'./router/index';//引入路由管理js

import {BrowserRouter as Router} from "react-router-dom";  //引用路由


// react 不推荐在他自身的原型上扩展，但毫无疑问这种操作很方便（受vue的影响吧） 后期可以优化
React.Component.prototype.$http = http;  //把封装的http挂载到react原型上

class App extends Component {
  render() {
    return (
      <Router>
        <div className="App">
          <Header></Header>
          <RouterIndex/> 
        </div>
      </Router>

    );
  }
}

export default App;
